package com.bw.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bw.domain.MaterialOrder;
import com.bw.mapper.MaterialMapper;
import com.bw.service.MaterialOrderService;
import com.bw.mapper.MaterialOrderMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86166
* @description 针对表【material_order】的数据库操作Service实现
* @createDate 2024-07-26 16:05:40
*/
@Service
public class MaterialOrderServiceImpl extends ServiceImpl<MaterialOrderMapper, MaterialOrder>
    implements MaterialOrderService{

    @Autowired
    MaterialOrderMapper materialOrderMapper;

    @Override
    public PageInfo<MaterialOrder> getlist(Integer pageNum) {
        PageHelper.startPage(pageNum,3);
        List<MaterialOrder> list = materialOrderMapper.list();
        PageInfo<MaterialOrder> materialOrderPageInfo = new PageInfo<>(list);
        return materialOrderPageInfo;
    }

    @Override
    public boolean delOne(String id) {
        return this.removeById(id);
    }
}




